
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: class Resource</title>
</head><body bgcolor="#f0f0f8">
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;for&nbsp;interacting&nbsp;with&nbsp;a&nbsp;resource.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Resource-cancel"><strong>cancel</strong></a> = method(self, **kwargs)</dt><dd><tt>Cancels&nbsp;a&nbsp;user's&nbsp;subscription&nbsp;purchase.&nbsp;The&nbsp;subscription&nbsp;remains&nbsp;valid&nbsp;until&nbsp;its&nbsp;expiration&nbsp;time.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;pp:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;trace:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;packageName:&nbsp;string,&nbsp;The&nbsp;package&nbsp;name&nbsp;of&nbsp;the&nbsp;application&nbsp;for&nbsp;which&nbsp;this&nbsp;subscription&nbsp;was&nbsp;purchased&nbsp;(for&nbsp;example,&nbsp;'com.some.thing').&nbsp;(required)<br>
&nbsp;&nbsp;strict:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;token:&nbsp;string,&nbsp;The&nbsp;token&nbsp;provided&nbsp;to&nbsp;the&nbsp;user's&nbsp;device&nbsp;when&nbsp;the&nbsp;subscription&nbsp;was&nbsp;purchased.&nbsp;(required)<br>
&nbsp;&nbsp;userip:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;subscriptionId:&nbsp;string,&nbsp;The&nbsp;purchased&nbsp;subscription&nbsp;ID&nbsp;(for&nbsp;example,&nbsp;'monthly001').&nbsp;(required)</tt></dd></dl>

<dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Checks&nbsp;whether&nbsp;a&nbsp;user's&nbsp;subscription&nbsp;purchase&nbsp;is&nbsp;valid&nbsp;and&nbsp;returns&nbsp;its&nbsp;expiry&nbsp;time.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;pp:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;trace:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;packageName:&nbsp;string,&nbsp;The&nbsp;package&nbsp;name&nbsp;of&nbsp;the&nbsp;application&nbsp;for&nbsp;which&nbsp;this&nbsp;subscription&nbsp;was&nbsp;purchased&nbsp;(for&nbsp;example,&nbsp;'com.some.thing').&nbsp;(required)<br>
&nbsp;&nbsp;strict:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;token:&nbsp;string,&nbsp;The&nbsp;token&nbsp;provided&nbsp;to&nbsp;the&nbsp;user's&nbsp;device&nbsp;when&nbsp;the&nbsp;subscription&nbsp;was&nbsp;purchased.&nbsp;(required)<br>
&nbsp;&nbsp;userip:&nbsp;string,&nbsp;A&nbsp;parameter<br>
&nbsp;&nbsp;subscriptionId:&nbsp;string,&nbsp;The&nbsp;purchased&nbsp;subscription&nbsp;ID&nbsp;(for&nbsp;example,&nbsp;'monthly001').&nbsp;(required)<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;An&nbsp;object&nbsp;of&nbsp;the&nbsp;form<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;#&nbsp;A&nbsp;Purchase&nbsp;resource&nbsp;indicates&nbsp;the&nbsp;status&nbsp;of&nbsp;a&nbsp;user's&nbsp;subscription&nbsp;purchase.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"initiationTimestampMsec":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Time&nbsp;at&nbsp;which&nbsp;the&nbsp;subscription&nbsp;was&nbsp;granted,&nbsp;in&nbsp;milliseconds&nbsp;since&nbsp;Epoch.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"kind":&nbsp;"androidpublisher#subscriptionPurchase",&nbsp;#&nbsp;This&nbsp;kind&nbsp;represents&nbsp;a&nbsp;subscriptionPurchase&nbsp;object&nbsp;in&nbsp;the&nbsp;androidpublisher&nbsp;service.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"autoRenewing":&nbsp;True&nbsp;or&nbsp;False,&nbsp;#&nbsp;Whether&nbsp;the&nbsp;subscription&nbsp;will&nbsp;automatically&nbsp;be&nbsp;renewed&nbsp;when&nbsp;it&nbsp;reaches&nbsp;its&nbsp;current&nbsp;expiry&nbsp;time.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"validUntilTimestampMsec":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Time&nbsp;at&nbsp;which&nbsp;the&nbsp;subscription&nbsp;will&nbsp;expire,&nbsp;in&nbsp;milliseconds&nbsp;since&nbsp;Epoch.<br>
&nbsp;&nbsp;}</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table>
</body></html>